
# 父亲行为重写   ----在子类里面写了一个同名函数

class Person(object):
    def __init__(self,gao,zhong,age):
        self.__gao=gao
        self.zhong=zhong
        self.age=age
    def eat(self):
        print("有本事你别吃")
    def sleep(self):
        print("睡觉使你快乐,但是你往往不快乐")
    def hua(self):
        print("一天不花钱,浑身不得劲")
    def __kouBiZi(self):
        print("抠鼻子偷偷的扣,别让人看到")

class student(Person):
    def __init__(self,toufa):
        self.toufa=toufa
    def eat(self):
        print("我是学生,我吃的跟你不一样")
if __name__=='__main__':
    b=student("短头发")
    b.hua()
    print(b.age)
    b.eat()
